﻿<Windows:AbstractRibbonToolBar x:Class="PefStudio.Windows.FontRibbonToolBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Windows="clr-namespace:PefStudio.Windows;assembly=PefStudio.Ribbon" xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Fluent:RibbonToolBar.LayoutDefinitions>
        <Fluent:RibbonToolBarLayoutDefinition Size="Large">
            <Fluent:RibbonToolBarRow>
                <Fluent:RibbonToolBarControlDefinition Target="comboBoxFontName" Width="75"/>
                <Fluent:RibbonToolBarControlDefinition Target="comboBoxFontSize" Width="45"/>
                <Fluent:RibbonToolBarControlGroupDefinition>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonGrowFont"/>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonShrinkFont"/>
                </Fluent:RibbonToolBarControlGroupDefinition>
                <Fluent:RibbonToolBarControlGroupDefinition>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonChangeCase"/>
                </Fluent:RibbonToolBarControlGroupDefinition>
                <Fluent:RibbonToolBarControlGroupDefinition>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonClearFormatting"/>
                </Fluent:RibbonToolBarControlGroupDefinition>
            </Fluent:RibbonToolBarRow>
            <Fluent:RibbonToolBarRow>
                <Fluent:RibbonToolBarControlGroupDefinition>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonBold"/>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonItalic"/>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonUnderline"/>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonStrikethrough"/>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonSubscript"/>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonSuperscript"/>
                </Fluent:RibbonToolBarControlGroupDefinition>
                <Fluent:RibbonToolBarControlGroupDefinition>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonTextEffects"/>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonTextHighlightColor"/>
                    <Fluent:RibbonToolBarControlDefinition Target="buttonFontColor"/>
                </Fluent:RibbonToolBarControlGroupDefinition>
            </Fluent:RibbonToolBarRow>
        </Fluent:RibbonToolBarLayoutDefinition>

        <Fluent:RibbonToolBarLayoutDefinition Size="Middle">
              <Fluent:RibbonToolBarRow>
                <Fluent:RibbonToolBarControlDefinition Target="comboBoxFontName" Width="125"/>
                <Fluent:RibbonToolBarControlDefinition Target="comboBoxFontSize" Width="50"/>
              </Fluent:RibbonToolBarRow>
            <Fluent:RibbonToolBarRow>
              <Fluent:RibbonToolBarControlGroupDefinition>
                <Fluent:RibbonToolBarControlDefinition Target="buttonBold"/>
                <Fluent:RibbonToolBarControlDefinition Target="buttonItalic"/>
                <Fluent:RibbonToolBarControlDefinition Target="buttonUnderline"/>
                <Fluent:RibbonToolBarControlDefinition Target="buttonStrikethrough"/>
                <Fluent:RibbonToolBarControlDefinition Target="buttonSubscript"/>
                <Fluent:RibbonToolBarControlDefinition Target="buttonSuperscript"/>
              </Fluent:RibbonToolBarControlGroupDefinition>
              <Fluent:RibbonToolBarControlGroupDefinition>
                <Fluent:RibbonToolBarControlDefinition Target="buttonClearFormatting"/>
              </Fluent:RibbonToolBarControlGroupDefinition>
              </Fluent:RibbonToolBarRow>
            <Fluent:RibbonToolBarRow>
                <Fluent:RibbonToolBarControlGroupDefinition>
                  <Fluent:RibbonToolBarControlDefinition Target="buttonTextEffects"/>
                  <Fluent:RibbonToolBarControlDefinition Target="buttonTextHighlightColor"/>
                  <Fluent:RibbonToolBarControlDefinition Target="buttonFontColor"/>
                  <Fluent:RibbonToolBarControlDefinition Target="buttonChangeCase"/>
                </Fluent:RibbonToolBarControlGroupDefinition>
                <Fluent:RibbonToolBarControlGroupDefinition>
                  <Fluent:RibbonToolBarControlDefinition Target="buttonGrowFont"/>
                  <Fluent:RibbonToolBarControlDefinition Target="buttonShrinkFont"/>                 
                </Fluent:RibbonToolBarControlGroupDefinition>
              </Fluent:RibbonToolBarRow>              
            </Fluent:RibbonToolBarLayoutDefinition>
    </Fluent:RibbonToolBar.LayoutDefinitions>

    <Fluent:ComboBox x:Name="comboBoxFontName" MinWidth="40" Height="22" BorderBrush="Gainsboro" Foreground="#FF222222" GroupBy="Tag" DisplayMemberPath="Text" IsTextSearchEnabled="True" ResizeMode="Vertical" Fluent:KeyTip.Keys="FF"  SizeDefinition="Small" SelectedIndex="0">
        <TextBlock Text="Arial" Tag="Theme Fonts"/>
        <TextBlock Text="Tahoma" Tag="Theme Fonts"/>
        <TextBlock Text="Tahoma" Tag="Recent Used Fonts"/>
        <TextBlock Text="Arial" Tag="AllFonts"/>
        <TextBlock Text="Segoe UI" Tag="AllFonts" x:Name="segoeFont"/>
        <TextBlock Text="Tahoma" Tag="AllFonts"/>
        <TextBlock Text="Webdings" Tag="AllFonts"/>
        <TextBlock Text="Winding" Tag="AllFonts"/>
    </Fluent:ComboBox>
    <Fluent:ComboBox x:Name="comboBoxFontSize" Width="49" HorizontalAlignment="Left" Height="22" SelectedIndex="1" BorderBrush="Gainsboro" Foreground="#FF222222" Text="12" DisplayMemberPath="Text" IsEditable="False" SizeDefinition="Small" ResizeMode="Vertical" Fluent:KeyTip.Keys="FS">
        <TextBlock Text="7"/>
        <TextBlock Text="8"/>
        <TextBlock Text="9"/>
        <TextBlock Text="10"/>
        <TextBlock Text="11"/>
        <TextBlock Text="12"/>
        <TextBlock Text="14"/>
        <TextBlock Text="16"/>
        <TextBlock Text="18"/>
        <TextBlock Text="20"/>
        <TextBlock Text="22"/>
        <TextBlock Text="24"/>
        <TextBlock Text="28"/>
        <TextBlock Text="32"/>
        <TextBlock Text="36"/>
        <TextBlock Text="48"/>
        <TextBlock Text="72"/>
    </Fluent:ComboBox>
    <Fluent:Button Fluent:KeyTip.Keys="GF" x:Name="buttonGrowFont" Icon="Images\GrowFont.png"  HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:Button x:Name="buttonShrinkFont" Icon="Images\ShrinkFont.png"  HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:DropDownButton x:Name="buttonChangeCase" Icon="Images\ChangeCase.png"  HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:Button x:Name="buttonClearFormatting" Icon="Images\ClearFormatting.png"  HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:ToggleButton Fluent:KeyTip.Keys="B" x:Name="buttonBold" Icon="Images\Bold.png" HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:ToggleButton x:Name="buttonItalic" Icon="Images\Italic.png"  HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:DropDownButton x:Name="buttonUnderline" Icon="Images\Underline.png"  HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:Button x:Name="buttonStrikethrough" Icon="Images\Strikethrough.png" HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:Button x:Name="buttonSubscript" Icon="Images\Subscript.png" HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:Button x:Name="buttonSuperscript" Icon="Images\Superscript.png" HorizontalAlignment="Left" SizeDefinition="Small"/>
    <Fluent:DropDownButton x:Name="buttonTextEffects" HorizontalAlignment="Left" SizeDefinition="Small">
        <Fluent:DropDownButton.Icon>
            <Grid>
                <Image Source="Images\TextEffects.png" Width="16" Height="16"/>
                <Rectangle VerticalAlignment ="Bottom" Height="2" Width="16" HorizontalAlignment="Center">
                    <Rectangle.Fill>
                        <SolidColorBrush Color="{Binding SelectedColor, ElementName=standardColorGallery}"/>
                    </Rectangle.Fill>
                </Rectangle>
            </Grid>
        </Fluent:DropDownButton.Icon>
        <Fluent:ColorGallery Mode="StandardColors" x:Name="standardColorGallery" SelectedColor="Pink"/>
    </Fluent:DropDownButton>
    <Fluent:DropDownButton x:Name="buttonTextHighlightColor" HorizontalAlignment="Left" SizeDefinition="Small">
        <Fluent:DropDownButton.Icon>
            <Grid>
                <Image Source="Images\TextHighlightColor.png" Width="16" Height="16"/>
                <Rectangle VerticalAlignment ="Bottom" Height="4" Width="16" HorizontalAlignment="Center">
                    <Rectangle.Fill>
                        <SolidColorBrush Color="{Binding SelectedColor, ElementName=highlightColorGallery}"/>
                    </Rectangle.Fill>
                </Rectangle>
            </Grid>
        </Fluent:DropDownButton.Icon>
        <Fluent:ColorGallery Mode="HighlightColors" x:Name="highlightColorGallery" SelectedColor="Yellow" IsAutomaticColorButtonVisible="False"/>
    </Fluent:DropDownButton>
    <Fluent:DropDownButton x:Name="buttonFontColor" HorizontalAlignment="Left" SizeDefinition="Small" MaxDropDownHeight="500">
        <Fluent:DropDownButton.Icon>
            <Grid>
                <Image Source="Images\FontColor.png" Width="16" Height="16" SnapsToDevicePixels="True" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                <Rectangle VerticalAlignment ="Bottom" Height="4" Width="16" HorizontalAlignment="Center">
                    <Rectangle.Fill>
                        <SolidColorBrush Color="{Binding SelectedColor, ElementName=themeColorGallery}"/>
                    </Rectangle.Fill>
                </Rectangle>
            </Grid>
        </Fluent:DropDownButton.Icon>
        <Fluent:ColorGallery ThemeColorsSource="{Binding ThemeColors}" SelectedColor="Blue" Mode="ThemeColors" StandardColorGridRows="3" Columns="10" ThemeColorGridRows="5" x:Name="themeColorGallery" IsNoColorButtonVisible="True" />
    </Fluent:DropDownButton>
</Windows:AbstractRibbonToolBar>